<?php 

session_start();
if (!isset ($_SESSION["id"])) {
	session_destroy();
	echo "<script language='javascript'>top.location.href = 'Login.php';</script>";
	exit;
}

	if(isset($_POST['hidd'])&&!empty($_POST['hidd'])){
		include_once 'public/DB_Oracle.php';
		$DBsql = new DB_Oracle ();
		$uiId=substr($_POST['hidd'],1);
		$peId=$_POST['uiId'];
		$sql="update sys_permission set web_ui='$uiId' where permission_index='$peId'";
		if($DBsql->query($sql)){
			echo "<script language='javascript'>alert('权限修改成功！');window.location.href='group.php'</script>";
		}else{
			echo "<script language='javascript'>alert('权限修改失败！');window.location.href='qx.php'</script>";
		}
	}else{
		echo "<script language='javascript'>alert('请选择权限后再提交！');window.location.href='qx.php'</script>";
	}
?>